package com.youmu.sichuansfc.domain;

import com.youmu.sichuansfc.dto.fund.FundManagerFundInvestDto;

import javax.persistence.*;
import java.util.Date;
import java.util.List;
import java.util.Objects;

@Entity
@Table(name = "youmu_fund_manager_fund", schema = "youmu", catalog = "")
public class YoumuFundManagerFund {
    private Long id;
    private Date addTime;
    private Integer status;
    private String fundName;
    private Double palnMoney;
    private Integer organizaTye;
    private Integer fundType;
    private Date fundTime;
    private Boolean putOnRecord;
    private Date endTime;
    private Double realMoney;
    private String bankrollSource;
    private String investAspect;
    private Integer investCount;
    private Integer investAgencyCount;
    private Integer investNaturalCount;
    private Double investMinMoney;
    private Double agencyRealMoney;
    private Double naturalRealMoney;
    private Boolean isTrusteeship;
    private Boolean isRank;
    private String trusteeshipUser;
    private Double rankRatio;
    private Long fundManagerId;
    private Integer updateCount;
    private Boolean isDelete;
    private Date putOnTime;
    private String investProject;
    private String investCraft;
    private String investMoney;
    private String investPlace;
    private Long parentId;
    private String investManagerAdd;
    private Double investManagerAddMoney;
    private String trusteeshipCompanyType;
    private String trusteeshipCompany;
    private Double investNaturalRealMoney;
    private Long fundUserId;

    public void setId(long id) {
        this.id = id;
    }


    public void setFundManagerId(long fundManagerId) {
        this.fundManagerId = fundManagerId;
    }

    public void setUpdateCount(int updateCount) {
        this.updateCount = updateCount;
    }


    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "add_time")
    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    @Basic
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "fund_name")
    public String getFundName() {
        return fundName;
    }

    public void setFundName(String fundName) {
        this.fundName = fundName;
    }

    @Basic
    @Column(name = "paln_money")
    public Double getPalnMoney() {
        return palnMoney;
    }

    public void setPalnMoney(Double palnMoney) {
        this.palnMoney = palnMoney;
    }

    @Basic
    @Column(name = "organiza_tye")
    public Integer getOrganizaTye() {
        return organizaTye;
    }

    public void setOrganizaTye(Integer organizaTye) {
        this.organizaTye = organizaTye;
    }

    @Basic
    @Column(name = "fund_type")
    public Integer getFundType() {
        return fundType;
    }

    public void setFundType(Integer fundType) {
        this.fundType = fundType;
    }

    @Basic
    @Column(name = "fund_time")
    public Date getFundTime() {
        return fundTime;
    }

    public void setFundTime(Date fundTime) {
        this.fundTime = fundTime;
    }

    @Basic
    @Column(name = "put_on_record")
    public Boolean getPutOnRecord() {
        return putOnRecord;
    }

    public void setPutOnRecord(Boolean putOnRecord) {
        this.putOnRecord = putOnRecord;
    }

    @Basic
    @Column(name = "end_time")
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Basic
    @Column(name = "real_money")
    public Double getRealMoney() {
        return realMoney;
    }

    public void setRealMoney(Double realMoney) {
        this.realMoney = realMoney;
    }

    @Basic
    @Column(name = "bankroll_source")
    public String getBankrollSource() {
        return bankrollSource;
    }

    public void setBankrollSource(String bankrollSource) {
        this.bankrollSource = bankrollSource;
    }

    @Basic
    @Column(name = "invest_aspect")
    public String getInvestAspect() {
        return investAspect;
    }

    public void setInvestAspect(String investAspect) {
        this.investAspect = investAspect;
    }

    @Basic
    @Column(name = "invest_count")
    public Integer getInvestCount() {
        return investCount;
    }

    public void setInvestCount(Integer investCount) {
        this.investCount = investCount;
    }

    @Basic
    @Column(name = "invest_agency_count")
    public Integer getInvestAgencyCount() {
        return investAgencyCount;
    }

    public void setInvestAgencyCount(Integer investAgencyCount) {
        this.investAgencyCount = investAgencyCount;
    }

    @Basic
    @Column(name = "invest_natural_count")
    public Integer getInvestNaturalCount() {
        return investNaturalCount;
    }

    public void setInvestNaturalCount(Integer investNaturalCount) {
        this.investNaturalCount = investNaturalCount;
    }

    @Basic
    @Column(name = "invest_min_money")
    public Double getInvestMinMoney() {
        return investMinMoney;
    }

    public void setInvestMinMoney(Double investMinMoney) {
        this.investMinMoney = investMinMoney;
    }

    @Basic
    @Column(name = "agency_real_money")
    public Double getAgencyRealMoney() {
        return agencyRealMoney;
    }

    public void setAgencyRealMoney(Double agencyRealMoney) {
        this.agencyRealMoney = agencyRealMoney;
    }

    @Basic
    @Column(name = "natural_real_money")
    public Double getNaturalRealMoney() {
        return naturalRealMoney;
    }

    public void setNaturalRealMoney(Double naturalRealMoney) {
        this.naturalRealMoney = naturalRealMoney;
    }

    @Basic
    @Column(name = "is_trusteeship")
    public Boolean getIsTrusteeship() {
        return isTrusteeship;
    }

    public void setIsTrusteeship(Boolean trusteeship) {
        isTrusteeship = trusteeship;
    }

    @Basic
    @Column(name = "is_rank")
    public Boolean getIsRank() {
        return isRank;
    }

    public void setIsRank(Boolean rank) {
        isRank = rank;
    }

    @Basic
    @Column(name = "trusteeship_user")
    public String getTrusteeshipUser() {
        return trusteeshipUser;
    }

    public void setTrusteeshipUser(String trusteeshipUser) {
        this.trusteeshipUser = trusteeshipUser;
    }

    @Basic
    @Column(name = "rank_ratio")
    public Double getRankRatio() {
        return rankRatio;
    }

    public void setRankRatio(Double rankRatio) {
        this.rankRatio = rankRatio;
    }

    @Basic
    @Column(name = "fund_manager_id")
    public Long getFundManagerId() {
        return fundManagerId;
    }

    public void setFundManagerId(Long fundManagerId) {
        this.fundManagerId = fundManagerId;
    }

    @Basic
    @Column(name = "update_count")
    public Integer getUpdateCount() {
        return updateCount;
    }

    public void setUpdateCount(Integer updateCount) {
        this.updateCount = updateCount;
    }

    @Basic
    @Column(name = "is_delete")
    public Boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Boolean delete) {
        isDelete = delete;
    }

    @Basic
    @Column(name = "put_on_time")
    public Date getPutOnTime() {
        return putOnTime;
    }

    public void setPutOnTime(Date putOnTime) {
        this.putOnTime = putOnTime;
    }

    @Basic
    @Column(name = "invest_project")
    public String getInvestProject() {
        return investProject;
    }

    public void setInvestProject(String investProject) {
        this.investProject = investProject;
    }

    @Basic
    @Column(name = "invest_craft")
    public String getInvestCraft() {
        return investCraft;
    }

    public void setInvestCraft(String investCraft) {
        this.investCraft = investCraft;
    }

    @Basic
    @Column(name = "invest_money")
    public String getInvestMoney() {
        return investMoney;
    }

    public void setInvestMoney(String investMoney) {
        this.investMoney = investMoney;
    }

    @Basic
    @Column(name = "invest_place")
    public String getInvestPlace() {
        return investPlace;
    }

    public void setInvestPlace(String investPlace) {
        this.investPlace = investPlace;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YoumuFundManagerFund that = (YoumuFundManagerFund) o;
        return id == that.id &&
                fundManagerId == that.fundManagerId &&
                updateCount == that.updateCount &&
                Objects.equals(addTime, that.addTime) &&
                Objects.equals(status, that.status) &&
                Objects.equals(fundName, that.fundName) &&
                Objects.equals(palnMoney, that.palnMoney) &&
                Objects.equals(organizaTye, that.organizaTye) &&
                Objects.equals(fundType, that.fundType) &&
                Objects.equals(fundTime, that.fundTime) &&
                Objects.equals(putOnRecord, that.putOnRecord) &&
                Objects.equals(endTime, that.endTime) &&
                Objects.equals(realMoney, that.realMoney) &&
                Objects.equals(bankrollSource, that.bankrollSource) &&
                Objects.equals(investAspect, that.investAspect) &&
                Objects.equals(investCount, that.investCount) &&
                Objects.equals(investAgencyCount, that.investAgencyCount) &&
                Objects.equals(investNaturalCount, that.investNaturalCount) &&
                Objects.equals(investMinMoney, that.investMinMoney) &&
                Objects.equals(agencyRealMoney, that.agencyRealMoney) &&
                Objects.equals(naturalRealMoney, that.naturalRealMoney) &&
                Objects.equals(isTrusteeship, that.isTrusteeship) &&
                Objects.equals(isRank, that.isRank) &&
                Objects.equals(trusteeshipUser, that.trusteeshipUser) &&
                Objects.equals(rankRatio, that.rankRatio) &&
                Objects.equals(isDelete, that.isDelete) &&
                Objects.equals(putOnTime, that.putOnTime) &&
                Objects.equals(investProject, that.investProject) &&
                Objects.equals(investCraft, that.investCraft) &&
                Objects.equals(investMoney, that.investMoney) &&
                Objects.equals(investPlace, that.investPlace);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, addTime, status, fundName, palnMoney, organizaTye, fundType, fundTime, putOnRecord, endTime, realMoney, bankrollSource, investAspect, investCount, investAgencyCount, investNaturalCount, investMinMoney, agencyRealMoney, naturalRealMoney, isTrusteeship, isRank, trusteeshipUser, rankRatio, fundManagerId, updateCount, isDelete, putOnTime, investProject, investCraft, investMoney, investPlace);
    }

    @Basic
    @Column(name = "parent_id")
    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Basic
    @Column(name = "invest_manager_add")
    public String getInvestManagerAdd() {
        return investManagerAdd;
    }

    public void setInvestManagerAdd(String investManagerAdd) {
        this.investManagerAdd = investManagerAdd;
    }

    @Basic
    @Column(name = "invest_manager_add_money")
    public Double getInvestManagerAddMoney() {
        return investManagerAddMoney;
    }

    public void setInvestManagerAddMoney(Double investManagerAddMoney) {
        this.investManagerAddMoney = investManagerAddMoney;
    }

    @Basic
    @Column(name = "trusteeship_company_type")
    public String getTrusteeshipCompanyType() {
        return trusteeshipCompanyType;
    }

    public void setTrusteeshipCompanyType(String trusteeshipCompanyType) {
        this.trusteeshipCompanyType = trusteeshipCompanyType;
    }

    @Basic
    @Column(name = "trusteeship_company")
    public String getTrusteeshipCompany() {
        return trusteeshipCompany;
    }

    public void setTrusteeshipCompany(String trusteeshipCompany) {
        this.trusteeshipCompany = trusteeshipCompany;
    }

    @Basic
    @Column(name = "invest_natural_real_money")
    public Double getInvestNaturalRealMoney() {
        return investNaturalRealMoney;
    }

    public void setInvestNaturalRealMoney(Double investNaturalRealMoney) {
        this.investNaturalRealMoney = investNaturalRealMoney;
    }

    // 主要投向
    @Transient
    private List<FundManagerFundInvestDto> fundInvestDtos;

    public List<FundManagerFundInvestDto> getFundInvestDtos() {
        return fundInvestDtos;
    }

    public void setFundInvestDtos(List<FundManagerFundInvestDto> fundInvestDtos) {
        this.fundInvestDtos = fundInvestDtos;
    }

    @Basic
    @Column(name = "fund_user_id")
    public Long getFundUserId() {
        return fundUserId;
    }

    public void setFundUserId(Long fundUserId) {
        this.fundUserId = fundUserId;
    }
}
